﻿using System;
using System.Collections.Generic;
using System.Windows;

namespace FrontDisplay
{
    public class HotkeyCollection
    {
        private readonly List<Hotkey> _list = new List<Hotkey>();

        public void Register(Window windowControl)
        {
            foreach (var item in _list)
            {
                item.Register(windowControl);
            }
        }

        public void Unregister()
        {
            foreach (var item in _list)
            {
                item.Unregister();
            }
        }

        public void Add(HotkeyInfo hotkeyInfo, Action action)
        {
            _list.Add(new Hotkey(hotkeyInfo) {Action = action});
        }
    }
}
